<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <canvas id="myCanvas" width="400" height="400" style="box-shadow: 0 0 10px #000;"></canvas>
</body>

</html>

<script>
  const canvas = document.getElementById('myCanvas')
  const c = canvas.getContext('2d')

  var img = new Image()
  img.src = '../asset/picture-drag/img1.JPG'

  img.onload = function () {
    c.drawImage(this, 10, 10, 280, 200)
  }
</script>